package com.jms.jmsspring.producer;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description
 * @Author
 * @Date 2020/3/18 19:41
 **/
public class AppProducer {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("producer.xml");
        ProducerService bean = context.getBean(ProducerService.class);

        bean.sendMessage("hello");
        ((ClassPathXmlApplicationContext) context).close();
    }
}
